﻿using System;
using System.Windows.Forms;

namespace StudyCode.Winform.Author
{
    public partial class AuthorControl : UserControl
    {
    

        public AuthorControl()
        {
            InitializeComponent();
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            //注意
            var form  =new AuthorAddForm();
            form.Show();
        }

        private void btnEdit_Click(object sender, EventArgs e)
        {
            //注意
            var form = new AuthorAddForm();
            form.StartPosition = FormStartPosition.CenterParent;
            form.ShowDialog(this);
            //form.Show(this);
        }

        private void btnDelete_Click(object sender, EventArgs e)
        {
            //注意
            var form = new AuthorAddForm();
            form.StartPosition = FormStartPosition.CenterScreen;
            form.ShowDialog(this);
            //form.Show();
        }
    }
}
